草庐IT

ionic 复选框

全部标签

javascript - 如何让复选框根据模型进行初始化?

我正在编写我的第一个非教程angular.js网络应用程序。我正在使用两个智能表和list模型。这是第一个使用all_types的st-safe-src的,它是一个json对象数组,看起来像这样......[{"_id":"56417a9603aba26400fcdb6a","type":"Beer","__v":0},{"_id":"56456140cb5c3e8f004f4c49","type":"Skiing","__v":0},...这是我用来显示此数据的表格的html:Types{{x.type}}id({{curid}}){{vendor.types}}当我向其中加载数据时

javascript - 标题复选框检查 gridview 行,但界面显示否则

我在更新面板(网络表单)中有一个GridView。GridView有一个标题复选框,因此当您单击标题复选框时,它会检查其下方的所有项目复选框,如下所示:注意函数调用onclick="toggleSelection(this);"这看起来像这样:functiontoggleSelection(source){$("#MainContent_gvCGinput[id*='chkSelector']").each(function(index){$(this).attr('checked',source.checked);if(source.checked)$(this).css({back

javascript - angularjs 中的 ui-view 和 ionic 中的 ion-nav-view 有什么区别

如您所知,在Angularui-router中,我们使用ui-view将html呈现给父级html。根据this:js文件:$stateProvider.state('report',{views:{'filters':{...templatesand/orcontrollers...},'tabledata':{},'graph':{},}})同样在Ionic框架中我们可以使用这个:有什么区别? 最佳答案 这是自定义Ionic框架指令。您可以在此处找到详细说明ion-nav-view.它具有更多高级功能,如跟踪历史记录、转换等等。

javascript - ionic /如何从选择控件中选择多个选项(最多选择 3 个选项)?

我目前使用的是Ionic1.3.16版本。在这里,我需要在我的选择控件中选择多个选项。这是我的ionicHTML代码:LightsaberBlueGreenRed 最佳答案 您在select选项中缺少value属性,因为当您选择选项时,它将反射(reflect)到ng-model。此外选择多个,您需要在选择中添加multiple属性。标记{{option.name}}{{selectedValues}} 关于javascript-ionic/如何从选择控件中选择多个选项(最多选择3个选项

javascript - 如何动态地将数据插入 ionic 滑动框Angularjs Ionic

我正在使用Ionic框架和Angularjs构建一个新闻应用程序!我正在使用ng-repeat在ion-slide-box上展示新闻,这里是一个例子:{{i.name}}{{i.gender}}{{i.age}}我想为每张幻灯片动态地将数据插入到我的ionic幻灯片盒中,所以我正在使用此代码:$scope.slideHasChanged=function(index){$scope.items.push("{name:'John',age:25,gender:'boy'}");}但这似乎不太奏效,所以如果您对我如何重新喜欢它有想法那就太好了:)这里是CODEPEN+CODE

javascript - ionic 模态不显示

我的ionic模态视图不会显示。屏幕会以某种方式变灰,但不会显示模态。请问这是怎么回事这是我的代码:原图:ContactInfo{{contact.name}}{{contact.info}}模态:EditContactNameInfoDoneController:.controller('DashCtrl',function($scope,$ionicModal){$scope.contact={name:'MittensCat',info:'Tapanywhereonthecardtoopenthemodal'}$ionicModal.fromTemplateUrl('templa

javascript - 将 ViewChild 用于动态元素 - Angular 2 和 ionic 2

我想使用多个IonicSlides我动态添加的。但是我不能使用@viewChild。请提出解决此问题的方法。Template.html://somecode组件.ts:@ViewChild('slides')slides:QueryList;....ngAfterViewInit(){setTimeout(()=>{alert(this.slides.toArray());//thislineriseerror},3000);}错误:_this.slides.toArrayisnotafunction 最佳答案 使用@ViewChi

javascript - 在编辑模式下执行 CRUD 操作时选择 ionic 选择选项

我正在对多个字段执行CRUD操作。我对所有字段都有[(ngModel)]。Iamnotinterestedtochangedthenameofthe[(ngModel)]orassignanyvalueintheregister.tsoredituser.tsfilewhileloading.SinceIhavemadetheformtosavethevaluessuccessfullyintheregistermodetotheDB.IneedtoshowtheInsertedvalueintheEdituserFormandhowcaniperformthat.注意:我在两种表单中

javascript - AngularJS 复选框选中自定义值

我正在尝试使用自定义值默认选中一个框。Areyouready?{{checked}}如果我将其设置为在单击该框之前不会显示任何内容。有没有一种方法可以检查默认值不是bool值? 最佳答案 ng-true-value="sure"。所以,ng-init="checked='sure'"代码片段Plunkr-http://plnkr.co/edit/ejYSsyIjMZSZua9cQyv1?p=preview 关于javascript-AngularJS复选框选中自定义值,我们在StackO

javascript - jqgrid 复选框更改事件

我的数据库中有真/假值。我想用jqgrid中的复选框更新它们。一旦该值设置为true,它将保持为true,不应更改。请看一下我的专栏模型:{name:'available',width:12,resizable:true,editable:true,align:'center',edittype:'checkbox',formatter:"checkbox",formatoptions:{disabled:false},classes:'check',editrules:{required:false},editoptions:{size:39,value:"True:False"}}